package com.goldplusgold.tradedelay.app.my.networkservice;

import com.goldplusgold.network.lib.annotation._HTTP_GET;
import com.goldplusgold.network.lib.annotation._HTTP_HEAD_PARAM;
import com.goldplusgold.network.lib.annotation._HTTP_PARAM;
import com.goldplusgold.network.lib.annotation._HTTP_POST;
import com.goldplusgold.network.lib.annotation._HTTP_URL;
import com.goldplusgold.network.lib.api.HeadApiDefaultParams;
import com.goldplusgold.network.lib.model.ErrorMessage;
import com.goldplusgold.tradedelay.app.my.pojo.CodeInfo;
import com.goldplusgold.tradedelay.app.my.account.UserInfo;

/**
 * Created by Administrator on 2017/5/11.
 */

public interface ApiMy {
    /*获取我的页面用户信息*/
    @_HTTP_GET
    @_HTTP_HEAD_PARAM(using = HeadApiDefaultParams.class)
    @_HTTP_URL(url = ApiConfig._USER_INFO_URL)
    UserInfo getUserInfo() throws Exception;

    /*登录*/
    @_HTTP_POST
    @_HTTP_URL(url = ApiConfig._USER_LOGIN_URL)
    UserInfo UserLogin(@_HTTP_PARAM("platform") String platform,
                       @_HTTP_PARAM("userName") String userName,
                       @_HTTP_PARAM("password") String password,
                       @_HTTP_PARAM("clientId") String clientId,
                       @_HTTP_PARAM("imei") String imei)
            throws Exception;

    /*微信登录*/
    @_HTTP_POST
    @_HTTP_URL(url = ApiConfig._WECHAT_LOGIN_URL)
    UserInfo WechatLogin(@_HTTP_PARAM("platform") String platform,
                         @_HTTP_PARAM("wechatCode") String wechatCode,
                         @_HTTP_PARAM("clientId") String clientId,
                         @_HTTP_PARAM("imei") String imei)
            throws Exception;

    /*绑定微信*/
    @_HTTP_POST
    @_HTTP_URL(url = ApiConfig._BIND_WECHAT_URL)
    UserInfo BindWechat(@_HTTP_PARAM("wechatCode") String wechatCode)
            throws Exception;

    /*微信认证*/
    @_HTTP_POST
    @_HTTP_URL(url = ApiConfig._WECHAT_AUTH_URL)
    UserInfo WechatAuth(@_HTTP_PARAM("platform") String platform,
                        @_HTTP_PARAM("wechatCode") String wechatCode,
                        @_HTTP_PARAM("clientId") String clientId,
                        @_HTTP_PARAM("userName") String userName,
                        @_HTTP_PARAM("code") String code,
                        @_HTTP_PARAM("imei") String imei)
            throws Exception;

    /*微信注册*/
    @_HTTP_POST
    @_HTTP_URL(url = ApiConfig._WECHAT_REGISTER_URL)
    UserInfo WechatRegister(@_HTTP_PARAM("platform") String platform,
                            @_HTTP_PARAM("wechatCode") String wechatCode,
                            @_HTTP_PARAM("clientId") String clientId,
                            @_HTTP_PARAM("userName") String userName,
                            @_HTTP_PARAM("password") String password,
                            @_HTTP_PARAM("imei") String imei)
            throws Exception;

    /*注册*/
    @_HTTP_POST
    @_HTTP_URL(url = ApiConfig._USER_Register_URL)
    UserInfo UserRegister(@_HTTP_PARAM("platform") String platform,
                          @_HTTP_PARAM("userName") String userName,
                          @_HTTP_PARAM("password") String password,
                          @_HTTP_PARAM("clientId") String clientId,
                          @_HTTP_PARAM("code") String code,
                          @_HTTP_PARAM("imei") String imei)
            throws Exception;

    /*获取注册验证码*/
    @_HTTP_GET
    @_HTTP_URL(url = ApiConfig._GET_USER_Register_CODE)
    CodeInfo GetRegisterCode(@_HTTP_PARAM("phone") String phone)
            throws Exception;

    /*获取忘记密码验证码*/
    @_HTTP_GET
    @_HTTP_URL(url = ApiConfig._GET_FORGOT_PWD_CODE)
    CodeInfo GetForgotPwdCode(@_HTTP_PARAM("phone") String phone)
            throws Exception;

    /*获取微信绑定验证码*/
    @_HTTP_GET
    @_HTTP_URL(url = ApiConfig._GET_WECHAT_BIND_CODE)
    CodeInfo GetWechatBindCode(@_HTTP_PARAM("phone") String phone)
            throws Exception;

    /*检验忘记密码验证码*/
    @_HTTP_GET
    @_HTTP_URL(url = ApiConfig._CHECK_FORGOT_PWD_CODE)
    CodeInfo CheckForgotPwdCode(@_HTTP_PARAM("verifyCode") String verifyCode,
                                @_HTTP_PARAM("phone") String phone)
            throws Exception;

    /*重设登录密码*/
    @_HTTP_POST
    @_HTTP_URL(url = ApiConfig._RESET_LOGIN_PWD_URL)
    UserInfo ResetLoginPwd(@_HTTP_PARAM("newPassword") String newPassword,
                           @_HTTP_PARAM("phone") String phone,
                           @_HTTP_PARAM("code") String code,
                           @_HTTP_PARAM("clientId") String clientId,
                           @_HTTP_PARAM("imei") String imei,
                           @_HTTP_PARAM("platform") String platform)
            throws Exception;


    /*重设登录密码*/
    @_HTTP_GET
    @_HTTP_URL(url = ApiConfig._MY_SETTING_URL)
    ErrorMessage getSetting()
            throws Exception;
}
